package loaderTEST
{
	import flash.display.Sprite;
	import flash.events.Event;
	import iscript.gameFramework.GameLite.events.GameContentEvent;
	import iscript.gameFramework.GameLite.Game;
 
	public class loaderTest extends Sprite
	{
		
		public function loaderTest() 
		{
			var g:Game  = new Game(stage)
			
			this.addEventListener(Event.ENTER_FRAME,onFrameLogic)
			
			var path:Vector.<String> = new Vector.<String>();
			    path.push("http://app26483.imgcache.qzoneapp.com/app26483/raymond/item.swf");
			    path.push("http://app26483.imgcache.qzoneapp.com/app26483/raymond/ui_winshow.swf");
			    path.push("http://app26483.imgcache.qzoneapp.com/app26483/raymond/user_run.swf");
			
				for each( var item:String in path) {
					  Game.Content.addSwf(item);  
					}
				
		/*	Game.Content.addSwf("UISKin.swf?0");
			Game.Content.addSwf("UISKin.swf");
			Game.Content.addSwf("UISKin.swf");
			Game.Content.addSwf("UISKin.swf");
			Game.Content.addSwf("UISKin.swf?1");
			Game.Content.addSwf("UISKin.swf?2");
			*/
			Game.Content.addEventListener(GameContentEvent.EVERYTHING, evenything);
			Game.Content.addGameContentListener("UISKin.swf?2", getTarget);
			
		}
		
		private function onFrameLogic(e:Event):void 
		{
	 
			
			var kbps:Number = ((Game.graphicsDeviceManager.stage.loaderInfo.bytesTotal * 8) / 1024) / (1000 / 1000); 
			
			trace(kbps)
		}
		
		private function getTarget(e:GameContentEvent):void 
		{
			trace(e.key, e.content);
		}
		
		private function evenything(e:GameContentEvent):void 
		{
			trace(e.key);
		}
		
	}

}


